This will launch the application associated with the signature (example: to launch Microsoft Word®, give it "MSWD"). If the document name is not an empty string, it will be opened when the application starts up. You can also use this to tell an application that's already running to open a document. This will work correctly for any application whether or not it supports AppleEvents.
IMPORTANT NOTE: An application launch doesn’t complete until the frontmost application calls GetNextEvent. Unfortunately, 4D® doesn’t do so while a procedure is running. System 7 Pack 3.5 now calls SystemTask and GetNextEvent until the launch completes.
LaunchBehind
Err:=LaunchBehind(Creator;Document)
Works exactly the same as Launch, except that the application won’t be brought to the front.
FinderOpen
Err := FinderOpen(Pathname)
Sends an Open Selection AppleEvent to the Finder, which simulates double-clicking a file. Can be used to launch an application, open a folder, open a document, or mount a file server by opening an alias to a remote volume.
PrintDoc
Err:=PrintDoc(Signature;Document Name)
This is similar to Launch, except that the document will be printed. Unlike Launch, you must give it a non-blank document name.
QuitApp
Err:=QuitApp(Signature)
This will tell the specified application to quit. In many cases the application will ask whether any files should be saved. Some applications need to be brought to the front before quitting so they can display any alerts necessary.